package com.yc.system.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yc.sssmpg.dto.ProductDto;
import com.yc.system.dto.Filterbook;
import com.yc.system.dto.esmodel.BookInfo;
import com.yc.system.entity.Book;
import com.yc.framework.baseClass.BaseService;
import com.yc.framework.baseClass.R;

import java.util.List;

/**
 * <p>
 * 图书信息表 服务类
 * </p>
 *
 * @author 1850140986@qq.com
 * @since 2022-12-03
 */
public interface IBookService extends BaseService<Book> {

 /**
    * 分页查询实体列表
    * @param model 查询参数
    * @return 查询结果
    */
  R list( Book model);

      /**
      * 根据主键删除实体对象，返回值封装成R，若成功则会把要删除的主键计入返回的R
      *
      * @param id 主键
      * @return 删除是否成功
      */
      R removeModelById(String id);


    R uploadCoverPhoto(int bookId, String reqFullFileName);

    R updateBybookId(Book model);

    R selectBooksByUserId(int userId);

    R getSwiper();

    R getBookByBookId(int bookId);

    R getBooksByPageByUserId(IPage<Book> page, QueryWrapper<Book> wrapper, int i,int userId);

    R getBooksByPageRandom(IPage<Book> page, QueryWrapper<Book> wrapper, int i);

    R getBooksByTypeId(Book findByPage);

    R Filterbook(Filterbook filterbook);

    R pay();

    R filterBooksByES(Filterbook page);

    R getlikeByPageByUserId(IPage<Book> page, QueryWrapper<Book> wrapper, int i, Integer userId);
}
